//
//  SEGHotAreaButton.m
//  Commom
//
//  Created by 乔杨 on 2019/6/21.
//

#import "SEGHotAreaButton.h"

@implementation SEGHotAreaButton

#pragma mark - 扩大按钮点击热区
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent*)event {
    CGRect bounds = self.bounds;
    CGFloat widthExtra = MAX(self.minimumAreaSize.width - bounds.size.width, 0);
    CGFloat heightExtra = MAX(self.minimumAreaSize.height - bounds.size.height, 0);
    bounds = CGRectInset(bounds, -0.5 * widthExtra, -0.5 * heightExtra);
    return CGRectContainsPoint(bounds, point);
}

@end
